package com.zxcrm.zxcrm.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zxcrm.zxcrm.mapper.ZxcrmBusinessContactMapper;
import com.zxcrm.zxcrm.domain.ZxcrmBusinessContact;
import com.zxcrm.zxcrm.service.IZxcrmBusinessContactService;

/**
 * 商机和联系人关系表Service业务层处理
 * 
 * @author xu
 * @date 2025-07-11
 */
@Service
public class ZxcrmBusinessContactServiceImpl implements IZxcrmBusinessContactService 
{
    @Autowired
    private ZxcrmBusinessContactMapper zxcrmBusinessContactMapper;

    /**
     * 查询商机和联系人关系表
     * 
     * @param id 商机和联系人关系表主键
     * @return 商机和联系人关系表
     */
    @Override
    public ZxcrmBusinessContact selectZxcrmBusinessContactById(Long id)
    {
        return zxcrmBusinessContactMapper.selectZxcrmBusinessContactById(id);
    }

    /**
     * 查询商机和联系人关系表列表
     * 
     * @param zxcrmBusinessContact 商机和联系人关系表
     * @return 商机和联系人关系表
     */
    @Override
    public List<ZxcrmBusinessContact> selectZxcrmBusinessContactList(ZxcrmBusinessContact zxcrmBusinessContact)
    {
        return zxcrmBusinessContactMapper.selectZxcrmBusinessContactList(zxcrmBusinessContact);
    }

    /**
     * 新增商机和联系人关系表
     * 
     * @param zxcrmBusinessContact 商机和联系人关系表
     * @return 结果
     */
    @Override
    public int insertZxcrmBusinessContact(ZxcrmBusinessContact zxcrmBusinessContact)
    {
        return zxcrmBusinessContactMapper.insertZxcrmBusinessContact(zxcrmBusinessContact);
    }

    /**
     * 修改商机和联系人关系表
     * 
     * @param zxcrmBusinessContact 商机和联系人关系表
     * @return 结果
     */
    @Override
    public int updateZxcrmBusinessContact(ZxcrmBusinessContact zxcrmBusinessContact)
    {
        return zxcrmBusinessContactMapper.updateZxcrmBusinessContact(zxcrmBusinessContact);
    }

    /**
     * 批量删除商机和联系人关系表
     * 
     * @param ids 需要删除的商机和联系人关系表主键
     * @return 结果
     */
    @Override
    public int deleteZxcrmBusinessContactByIds(Long[] ids)
    {
        return zxcrmBusinessContactMapper.deleteZxcrmBusinessContactByIds(ids);
    }

    /**
     * 删除商机和联系人关系表信息
     * 
     * @param id 商机和联系人关系表主键
     * @return 结果
     */
    @Override
    public int deleteZxcrmBusinessContactById(Long id)
    {
        return zxcrmBusinessContactMapper.deleteZxcrmBusinessContactById(id);
    }

    @Override
    public void insertBatch(List<ZxcrmBusinessContact> businessContactList)
    {
        zxcrmBusinessContactMapper.insertBatch(businessContactList);
    }

    @Override
    public void deleteZxcrmBusinessContactByBussinessOpportunityId(Long bussinessOpportunityId)
    {
        zxcrmBusinessContactMapper.deleteZxcrmBusinessContactByBussinessOpportunityId(bussinessOpportunityId);
    }
}
